package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PaUserAddrOrderMapper;
import com.ruoyi.system.domain.PaUserAddrOrder;
import com.ruoyi.system.service.IPaUserAddrOrderService;

/**
 * 用户订单配送地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-03
 */
@Service
public class PaUserAddrOrderServiceImpl implements IPaUserAddrOrderService 
{
    @Autowired
    private PaUserAddrOrderMapper paUserAddrOrderMapper;

    /**
     * 查询用户订单配送地址
     * 
     * @param addrOrderId 用户订单配送地址主键
     * @return 用户订单配送地址
     */
    @Override
    public PaUserAddrOrder selectPaUserAddrOrderByAddrOrderId(Long addrOrderId)
    {
        return paUserAddrOrderMapper.selectPaUserAddrOrderByAddrOrderId(addrOrderId);
    }

    /**
     * 查询用户订单配送地址列表
     * 
     * @param paUserAddrOrder 用户订单配送地址
     * @return 用户订单配送地址
     */
    @Override
    public List<PaUserAddrOrder> selectPaUserAddrOrderList(PaUserAddrOrder paUserAddrOrder)
    {
        return paUserAddrOrderMapper.selectPaUserAddrOrderList(paUserAddrOrder);
    }

    /**
     * 新增用户订单配送地址
     * 
     * @param paUserAddrOrder 用户订单配送地址
     * @return 结果
     */
    @Override
    public int insertPaUserAddrOrder(PaUserAddrOrder paUserAddrOrder)
    {
        paUserAddrOrder.setCreateTime(DateUtils.getNowDate());
        return paUserAddrOrderMapper.insertPaUserAddrOrder(paUserAddrOrder);
    }

    /**
     * 修改用户订单配送地址
     * 
     * @param paUserAddrOrder 用户订单配送地址
     * @return 结果
     */
    @Override
    public int updatePaUserAddrOrder(PaUserAddrOrder paUserAddrOrder)
    {
        paUserAddrOrder.setUpdateTime(DateUtils.getNowDate());
        return paUserAddrOrderMapper.updatePaUserAddrOrder(paUserAddrOrder);
    }

    /**
     * 批量删除用户订单配送地址
     * 
     * @param addrOrderIds 需要删除的用户订单配送地址主键
     * @return 结果
     */
    @Override
    public int deletePaUserAddrOrderByAddrOrderIds(Long[] addrOrderIds)
    {
        return paUserAddrOrderMapper.deletePaUserAddrOrderByAddrOrderIds(addrOrderIds);
    }

    /**
     * 删除用户订单配送地址信息
     * 
     * @param addrOrderId 用户订单配送地址主键
     * @return 结果
     */
    @Override
    public int deletePaUserAddrOrderByAddrOrderId(Long addrOrderId)
    {
        return paUserAddrOrderMapper.deletePaUserAddrOrderByAddrOrderId(addrOrderId);
    }
}
